﻿@model IEnumerable<shop.DanhMuc>

@foreach(var item in Model )
{
    if(ViewBag.type=="1")
    {
       if(ViewBag.MaDM==item.MaDM)
       {
           <option selected="selected" value="@item.MaDM"> @item.DanhMuc1</option> 
       } 
       else
       {
           <option value="@item.MaDM"> @item.DanhMuc1</option> 
       }
    }
    else
    {
      <option value="@item.MaDM"> @item.DanhMuc1</option>   
    }
      
}